const state = {
  appointmentId: null,
};

const mutations = {
  SET_APPOINTMENT_ID: (state, appointmentId) => {
    state.appointmentId = appointmentId;
  },
  CLEAR_APPOINTMENT_ID: (state) => {
    state.appointmentId = null;
  },
};

const actions = {
  setAppointmentId({ commit }, appointmentId) {
    commit("SET_APPOINTMENT_ID", appointmentId);
  },
  clearAppointmentId({ commit }) {
    commit("CLEAR_APPOINTMENT_ID");
  },
};

const appointment = {

  namespaced: true,
  state,
  mutations,
  actions,
};

export default appointment;
